<template>
  <div>
    <el-button @click="toExamine">批量审核</el-button>
    <el-button @click="tabsBtn">添加开盘信息</el-button>
    <el-table
      :data="QueryOpeningData"
      height="400px"
      max-height="400px"
      size="small"
      row-class-name="row"
      cell-class-name="column"
      :highlight-current-row="true"
      fit
    >
      <el-table-column
        type="selection"
        width="55"
      >
      </el-table-column>
      <el-table-column
        v-for="(item, index) in tableLabel"
        :key="index"
        :prop="item.prop"
        :width="150"
        :label="item.label"
      >
      </el-table-column>
      <el-table-column label="操作">
        <template scope="scope">
          <el-button @click="tableDbEdit(scope.row)">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "floorAdminTable",
  // props: ["FloorBuildingTabs"],
  data() {
    return {
      state: "",
      tableLabel: [
        {
          label: "业态",
          width: "40",
          prop: "property_type.property_type_name",
        },
        {
          label: "预计开盘时间",
          width: "",
          prop: "opening_time",
        },
        { label: "准确开盘时间", width: "", prop: "accurate_opening_time" },
        {
          label: "开盘详情",
          width: "",
          prop: "opening_details",
        },
        { label: "状态", width: "", prop: "open_state" },
        // { label: "状态", width: "", prop: "state" },
        // { label: "操作", width: "", prop: "stateOne" },
      ],
    };
  },
  methods: {
    tableDbEdit(row) {
      // console.log(row);
      this.state = false;
      // 子组件向父组件传值
      this.$emit("func", this.state);
      // console.log(this.state);
    },
    toExamine() {
      // console.log(this.floorBuild);
    },
    tabsBtn(){
      this.tabsId = '4';
      this.state = false;
      // 子组件向父组件传值
      this.$emit("func", this.state);
      // console.log(this.state);
    },
  },
  computed: {
    QueryOpeningData() {
      return this.$store.state.FloorData.QueryOpeningData;
    },
  },
};
</script>

<style>
</style>